<template>
    <div>
        <!-- 黑色导航 -->
        <BackNav></BackNav> 
        <!-- 白色导航 -->
        <Nav class="nav" :MainList="MainList"></Nav>
        <!-- 轮播图 -->
        <!-- <Swipers class="Swiper"></Swipers> -->
        <!-- 点击首页显示 -->
        <!-- 轮播图上边 -->
        <router-view></router-view>
        <div class="bai"></div>
            
    </div>
</template>

<script>
    import BackNav from '@/pages/index/backNav.vue'
    import Nav from '@/pages/index/nav.vue'
    // import Swipers from '@/pages/index/swiper/newSwiper.vue'
export default {
    name: 'VueProject01Index',
    components:{
        BackNav,
        Nav,
    },
    data() {
        return {
            MainList:[],//导航
        };
    },

    mounted() {
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/category/head').then((res)=>{
            if(res.data){
                this.MainList=res.data.result
            }
        })


    },
    methods: {
        
    },
};
</script>

<style scoped lang="scss">

.bai{
    // height: 1000px;
    width: 100%;
    height: 674px;
    background: url('./home/img/yejiao.jpg');
}
.nav{
    z-index: 10000;
}
</style>